package com.lemo;

import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan("com.lemo.controller")
public class ActivitiApplication {

	public static void main(String[] args) {
		SpringApplication.run(ActivitiApplication.class, args);
	}

	/*@Bean
	public CommandLineRunner init(final RepositoryService repositoryService, final RuntimeService runtimeService,
			final TaskService taskService) {

		return new CommandLineRunner() {

			public void run(String... args) throws Exception {
				
				
				
				System.out.println(
						"流程定义个数: " + repositoryService.createProcessDefinitionQuery().count());
				System.out.println("任务个数: " + taskService.createTaskQuery().count());
				//ProcessInstance pi = runtimeService.startProcessInstanceByKey("travelPay");
				//System.out.println(": " + pi.getId());
				//System.out.println(": " + pi.getProcessDefinitionKey());
				//System.out.println(": " + taskService.createTaskQuery().count());

			}

		};

	}*/

}
